#ifndef __WEBPAGESEARCHER_HPP__
#define __WEBPAGESEARCHER_HPP__

#include <iostream>
#include <string>
#include "WebPageQuery.hpp"
#include "../server/TcpConnection.hpp"

class WebPageSearcher {
public:
    WebPageSearcher(){}
    WebPageSearcher(std::string keys, const TcpConnectionPtr& conn); // Constructor
    void doQuery(); // 执行查询

private:
    std::string _sought;        // 查询关键词
    TcpConnectionPtr _conn;     // TcpConnection对象
    WebPageQuery _query;
public:
    std::vector<std::string> jsonResult;
};

#endif
